<php>if($send_type =='send_weibo'){</php>
	<php>if(CheckPermission('core_normal','feed_post')){</php>
		<!-- 发布微博/微博 -->
		<div class="send_weibo diy-send-weibo" model-node="send_weibo">
			<div class="title clearfix">
				<div model-node="numsLeft" class="right num">{:L('PUBLIC_INPUT_CHARACTER_LIMIT',array('num'=>'<span>'.$initNums.'</span>'))}</div>
				<span>
				<php>if((Addons::requireHooks('weibo_send_box_tab')) && APP_NAME == 'public' && MODULE_NAME == 'Index' && ACTION_NAME == 'index'):</php>
					<a href="javascript:void(0)" id="change_weibo_tab" class="on">微博</a><i class="line"></i>
		     		{:Addons::hook('weibo_send_box_tab')}
				<php>else:</php>
				<a>{$title|getShort=###,32}</a>
				<php>endif;</php>
				</span>
		    </div> 
			<div class="input" model-node="weibo_post_box">
				<div class="input_before mb5" model-node="mini_editor" model-args="prompt={$prompt}">
					<textarea id="inputor{$time}" name="at" class="input_tips" event-node="mini_editor_textarea" model-args='t=feed'><if condition="trim($topicHtml) neq ''">{$topicHtml} </if></textarea>
					<div model-node="post_ok" style="display:none;text-align:center;position:absolute;left:0;top:10px;width:100%"><i class="ico-ok"></i>{:L('PUBLIC_SHARE_SUCCESS')}</div>
				</div>
				<div class="action clearfix" model-node='send_action'>
					<div class="kind">
					
					<div class="right release">{:Addons::hook('weibo_syn_middle_publish')}
						<a class="btn-grey-white" event-node='{$post_event}' event-args='type={$type}&app_name={$app_name}&topicHtml={$initHtml}' href="javascript:;"><span>发布</span></a>
					</div>

					<div class="acts">
						<eq name="actions.face" value="true">
						<php>if(in_array('face',$weibo_type)):</php>
					    <a event-node="insert_face" class="face-block" href="javascript:;"><i class="face"></i>表情</a>
						<php>endif;</php>
					    </eq>

					    <eq name="actions.at" value="true">
						<php>if(in_array('at',$weibo_type)):</php>
					    <a event-node="insert_at" class="at-block" href="javascript:;"><i class="at"></i>好友</a>
						<php>endif;</php>
					    </eq>

					    <eq name="actions.image" value="true">
					    <php>if(in_array('image',$weibo_type)):</php>
					    <a event-node="insert_image" class="image-block" href="javascript:;" rel="{$post_event}"><i class="image"></i>图片</a>
					    <div class="tips-img" style="display:none"><dl><dd><i class="arrow-open"></i>jpg,png,gif,bmp,tif</dd></dl></div>
					    <php>endif;</php>
					    </eq>

					    <eq name="actions.video" value="true">
					    <php>if(in_array('video',$weibo_type)):</php>
					    <input type="hidden" id="postvideourl" value="" />
					    <a event-node="insert_video" rel="{$post_event}" class="video-block" href="javascript:;"><i class="video"></i>视频</a>
					    <php>endif;</php>
					    </eq>

					    <eq name="actions.file" value="true">
					    <php>if(in_array('file',$weibo_type)):</php>
					    <a class="file-block" href="javascript:;"><i class="file"></i>附件
					    <form style='display:inline;padding:0;margin:0;border:0' >
					    <input event-node="insert_file" type="file" name="attach" inputname='attach' onchange="core.plugInit('uploadFile',this,'','all')" urlquery='attach_type=feed_file&upload_type=file' hidefocus="true">
					    </form>
					    </a> 
					    <php>endif;</php>
					    </eq>
					    
					    <eq name="actions.topic" value="true">
						<php>if(in_array('topic',$weibo_type)):</php>
					    <a event-node="insert_topic" class="topic-block" href="javascript:;"><i class="topic"></i>话题</a>
						<php>endif;</php>
						</eq>

						<eq name="actions.contribute" value="true">
						<php>if(in_array('contribute',$weibo_type) && $hasChannel):</php>
					    <a event-node="insert_contribute" class="contribute-block" href="javascript:;"><i class="contribute"></i>投稿</a>
					    <input type="hidden" autocomplete="off" value="" id="contribute" />
					    <php>endif;</php>
					    </eq>
						{:Addons::hook('home_index_middle_publish_type',array('position'=>'index'))}
					</div>	
					<div class="clear"></div>
		            <div model-node ='faceDiv'></div>
		            </div>
		        </div>
			</div>
		</div>
	<php>}else{</php>
 		<div class="send_weibo"><div class="box-purview"><i class="ico-error"></i>{:L('PUBLIC_SENTWEIBO_ISNOT')}</div></div>
	<php>}</php>
<php>}else if($send_type =='repost_weibo'){</php>
	<!-- 分享微博/微博发布框 -->
	<div class="action clearfix mb10" ><!--<span class="faces" event-node='share_insert_face'></span>--><div class="num"  model-node="numsLeft">{:L('PUBLIC_INPUT_CHARACTER_LIMIT',array('num'=>'<span>'.$initNums.'</span>'))}</div></div>
	<div model-node="weibo_post_box" class="clearfix">
		<div class="input_before" model-node="mini_editor" style='margin:0 0 5px 0' >
		<textarea id="message_inputor" class="input_tips" event-node="mini_editor_textarea" event-args='parentHeight=60'  model-args='t=repostweibo' style="height:52px;width:97%;">{$initHtml}</textarea>

		</div>
		<div class="action clearfix">
		<div><a href="javascript:;" class="btn-green-big right" event-node='post_share' event-args='sid={$sid}&type={$stype}&app_name={$app_name}&curid={$curid}&curtable={$curtable}'><span>{:L('PUBLIC_SHARE_STREAM')}</span></a></div>
		<div class="acts">
      		<a class="face-block" href="javascript:;" event-node="comment_insert_face"><i class="face"></i>表情</a>
      		<php>if(in_array('comment',$weibo_premission) && $cancomment==1):</php> 
	           <p><label><input type="checkbox" class="checkbox" name="comment" value='1'>{:L('PUBLIC_SENTWEIBO_TO',array('link'=>$space_link))}</label></p>
	       <php>endif;</php>
    	</div>
    	<div class="clear"></div>
      	<div model-node="faceDiv"></div>     	
      	</div>
	</div> 
		  	       

	</div>
	<script>
	$(function (){
		setTimeout(function (){
			core.weibo.checkNums($('#message_inputor').get(0));
		},500);
	});
	</script>
<php>}</php>

<script type="text/javascript">
var initNums = '{$initNums}';
var initHtml = '{$initHtml}';
core.loadFile(THEME_URL+'/js/plugins/core.at.js');
$(function (){
	$('#change_weibo_tab').click(function (){
		$('div[type="weibotab"]').hide();
	});
	if ( $('#inputor{$time}').get(0) != undefined ){
		setTimeout(function (){
			if ( initHtml ){
				$('#inputor{$time}').focus();
				$('#inputor{$time}').html(initHtml);
			}
		} , 300)
	}
	//$('#message_inputor').inputToEnd(initHtml);
});
setTimeout(function() {
	atWho($('#inputor{$time}'));
	atWho($('#message_inputor'));
}, 1000);
</script>